home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_03
/
allison
/
hello.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-02-07
|
296b
|
16 lines
LISTING 10 - A "Hello, world!" program
/* hello.c: Greet either the user or the world */
#include <stdio.h>
main(int argc, char *argv[])
{
if (argc > 1 && argv[1] != NULL)
printf("Hello, %s!\n",argv[1]);
else
printf("Hello, world!\n");
return 0;
}